import { http } from '@/utils/request'
import type { BannerItem, CategoryItem, HotItem, GuessItem } from '@/types/home'
import type { PageResult, PageParams } from '@/types/global'


// 首页轮播图 广告区域展示位置 1 为首页（默认值） 2 为商品分类页
export const getHomeSwiper = (distributionSite = 1) => {
	return http<BannerItem[]>({
		method: 'GET',
		url: '/home/banner',
		data: {
			distributionSite
		}
	})
}
// 首页分类
export const categoryMutli = () => {
	return http<CategoryItem[]>({
		method: 'GET',
		url: '/home/category/mutli',
	})
}

export const hotMutli = () => {
	return http<HotItem[]>({
		method: 'GET',
		url: '/home/hot/mutli',
	})
}

// 猜你喜欢数据
export const goodsGuessLike = (data ?: PageParams) => {
	return http<PageResult<GuessItem[]>>({
		method: 'GET',
		url: '/home/goods/guessLike',
		data
	})
}